##引入宏定义
$!define
##使用宏定义设置回调（保存位置与文件后缀）
#save("/entity", ".java")
##使用宏定义设置包后缀
#setPackageSuffix("entity")
##不使用这些列
#set ($specialColumn = ["createdAt", "updatedAt","isDeleted"])##
#set($newList = $tool.newArrayList())##
#foreach($column in $tableInfo.fullColumn)
    #if(!$specialColumn.contains(${column.name}))
        $tool.call($newList.add($column))#end#end
##重新保存列
$tableInfo.setFullColumn($newList)##
##对importList进行篡改
#set($tempImport = $tool.newHashSet())
#foreach($column in $tableInfo.fullColumn)
    #if(!$column.type.startsWith("java.lang."))
    ##带有反回值的方法调用时使用$tool.call来消除返回值
        $tool.call($tempImport.add($column.type))#end#end
#set($importList = $tempImport)##
##使用全局变量实现默认包导入
$!autoImport
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.io.Serializable;

##使用宏定义实现类注释信息
#tableComment("实体类")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "$!{tool.hump2Underline($tableInfo.name)}")
public class $!{tableInfo.name} implements Serializable {
    private static final long serialVersionUID = $!tool.serial();
#foreach($column in $tableInfo.fullColumn)
    #if(${column.comment})/**
    * ${column.comment}
    */#end
    #if(${column.name} == "id")

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)#else
    
    @Column(name = "$!{tool.hump2Underline($column.name)}")#end
    
    private $!{tool.getClsNameByFullName($column.type)} $!{column.name};
#end

}